<extend name="Public:baseAjax" />
<block name="content">
<Widget:show col="12" bdcls="no-padding" title="新增数据">
<form method="post" data-ajax action="{$insertUrl}">
<table class="table table-bordered">
    <volist name="model[fields]" id="f">
    <tr >
        <eq name="f[showAdd]" value="1">
            <td width="180" style="text-align:right">{$f.label}</td>
            <td >
            {:ipt($f)}
            </td>
        </eq>
    </tr>
    </volist>
    <tr>
        <td colspan="2">
        <button class="btn btn-primary" type="submit">保存</button>
    <a class="btn btn-default" href="#{$backUrl}">取消</a>
        </td>
    </tr>
</table> 
    
</form>

<load href="assets/trumbowyg/trumbowyg.css"/>
<load href="assets/trumbowyg/trumbowyg.js"/>
<load href="assets/trumbowyg/zh_cn.js"/>
<script type="text/javascript">
$(function(){
    $('[data-editor]').trumbowyg({
        lang: 'zh_cn',
        resetCss: true,
        autogrow: true,
    });
})    
</script>
</block>